package com.example.demo.mapper;


import com.example.demo.bean.CmsArticle;


import java.util.List;

import org.apache.ibatis.annotations.Mapper;


@Mapper
public interface CmsArticleMapper {
    int deleteByPrimaryKey(String id);

    int insert(CmsArticle record);

    CmsArticle selectByPrimaryKey(String id);

    List<CmsArticle> selectAll();

    int updateByPrimaryKey(CmsArticle record);


    /**
          * 查找和指定栏目相关联的文章个数
     * @param categroyId  栏目编号
     * @return
     */
    int selectArticleCountByCategoryId(String categroyId);


    List<CmsArticle> allArticleWithParent();
}

